<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=3.0, user-scalable=yes, viewport-fit=cover"/>
		<meta name="HandheldFriendly" content="true"/>
		<meta name="MobileOptimized" content="320"/>
		<title>Hello H5+</title>
		<script type="text/javascript" src="../js/common.js"></script>
		<script type="text/javascript">
var w=null;
// H5 plus事件处理
function plusReady(){
}
if(window.plus){
	plusReady();
}else{
	document.addEventListener('plusready', plusReady, false);
}
function imgLoaded(){
	w&&(w.close(),w=null);
	var b = document.body;
	var img = document.getElementById('img');
	var pb = b.clientHeight/b.clientWidth,
	pi = img.clientHeight/img.clientWidth;
	if(pb > pi){
		img.style.width = '100%';
	}else{
		img.style.height = '100%';
	}
	b.style.lineHeight = b.clientHeight+'px';
}
function imgError(){
	w&&(w.close(),w=null);
	document.getElementById('img').style.display = 'none';
	plus.nativeUI.alert('无效的图片资源', function(){
		back();
	});
}
function loadMedia(src){
	document.getElementById('img').src=src;
}
		</script>
		<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8"/>
		<style type="text/css" media="screen">
img {
	vertical-align: middle;
}
		</style>
	</head>
	<body style="text-align:center;background:#000000;">
		<img id="img" onclick="back()" onload="imgLoaded()" onerror="imgError()"/>
	</body>
</html>